﻿@model MaterialDelivery
@{
    ViewBag.Title = "送货单签收";
    Layout = "~/Views/Shared/_LayoutFormDetail.cshtml";
    ViewBag.SaveAction = "Sign";
}
@section Up{
    @Html.HiddenFor(model => model.Id)
    @Html.HiddenFor(model => model.State)
    @Html.HiddenFor(model => model.OrderDate)
    @Html.nbDropDownListFor(model => model.SiteID, "ProjectSite").Required()
    @Html.nbDateFor(model => model.Date).Required()
    @Html.nbTextBoxFor(model => model.TotalWeight).ReadOnly()
    @Html.nbTextBoxFor(model => model.TotalAmount).ReadOnly()
}
@section Down{
    @(Html.nbDetailFor<MaterialDeliveryItem>(s =>
    {
        s.layoutW(10);
        s.layoutH(162);
        s.Columns(col =>
        {
            col.Bind(e => e.Id).IsKey();
            col.Bind(e => e.MaterialId).Hide();
            col.Bind(e => e.SiteID).Hide();
            col.Bind(e => e.OrderId).Hide();
            col.Bind(e => e.Date).Hide();
            col.BindEnum(e => e.Category, "MaterialCategory").Width(60);
            col.Bind(e => e.Code).Title("编号").Width(40);
            col.Bind(e => e.Name).Width(60).Align(GridAlign.Left);
            col.Bind(m => m.Price).Width(30).Title("价格").Align(GridAlign.Right);
            col.BindEnum(m => m.Unit, "MaterialUnit").Title("单位").Width(30);
            col.Bind(m => m.DeliveryWeight).Width(50).Align(GridAlign.Right);
            col.Bind(m => m.Amount).Width(40).Title("金额").Align(GridAlign.Right);
            col.Bind(e => e.OrderWeight).Align(GridAlign.Right).Width(50);
            col.BindControl(e => e.SignWeight).Align(GridAlign.Right).Width(50);
        });
    }))
}
